package lesson22.Task02;

public class Car 
{
	private String manufacturer;
	private String model;
	private int yearOfManufacture;
	
	public Car(String manufacturer, String model, int yearOfManufacture) throws InvalidDataException 
	{
		if(manufacturer != null)
		{
			this.manufacturer = manufacturer;
		}
		else
		{
			throw new InvalidDataException();
		}
		if(model != null)
		{
			this.model = model;
		}
		else
		{
			throw new InvalidDataException();
		}
		if(yearOfManufacture > 0)
		{
			this.yearOfManufacture = yearOfManufacture;
		}
	}
}
